var AddRandomInUrl = function(url){
	if(url.indexOf(".shtml?")!=-1)
	{
		url = url+"&random="+Math.random();
	}else{
		url = url+"?random="+Math.random();
	}
	return url;
};
/***
 * 显示对话框　只有一列
 * 
 * @param {Object} url
 */
var showDialogOne = function(url,title){
	top.$.jBox("iframe:"+AddRandomInUrl(url),{
		id:'id-jbox-dialog',
	    title: title,
	    width: 800,
	    height: 450,
	    buttons: {}
	});
};

/***
 * 显示对话框　只有一列
 * 
 * @param {Object} url
 */
var showDialogWidthHeight = function(url,width,height,title){
	top.$.jBox("iframe:"+AddRandomInUrl(url),{
		id:'id-jbox-dialog',
	    title: title,
	    width: width,
	    top:'5%',
	    height: height,
	    buttons: {}
	});
};



var showDialogOneParent = function(url){
	var returnValue = window.showModalDialog(AddRandomInUrl(url),window,"dialogWidth:700px;dialogHeight:500px;scroll:no;resizable:yes;status:no;");
	if(returnValue==200)
	{
		parent.submitQuery();
	}
};
/***
 * 显示对话框　存在两列
 * 
 * @param {Object} url
 */
var showDialogTwo = function(url,title){
	top.$.jBox("iframe:"+AddRandomInUrl(url),{
		id:'id-jbox-dialog',
	    title: title,
	    width: 800,
	    height: 450,
	    buttons: {}
	});
};

var showDialogTwoParent = function(url)
{
	url = AddRandomInUrl(url);//在URL中加入随机参数
	var returnValue = window.showModalDialog(url,window,"dialogWidth:700px;dialogHeight:500px;scroll:no;resizable:yes;status:no;");
	if(returnValue==200)
	{
		/**如果模态窗口返回成功，则刷新当前form**/
		submitQuery();
	}
};
/***
 * 进入编辑框
 * @param {Object} url
 */
var showEditDialog = function(url,title)
{
	top.$.jBox("iframe:"+AddRandomInUrl(url),{
		id:'id-jbox-dialog',
	    title: title,
	    width: 800,
	    height: 450,
	    buttons: { }
	});
};
 	



